﻿using Benlai.Model.Doc;
using Benlai.Dac.Doc;
using Benlai.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Benlai.Bll.Doc
{
    public class DocManager
    {
        public List<TableModel> GetTableListByTable(string tableName)
        {
            TableDac dac = new TableDac();
            dac.SortPropertyName = "OrderNumber";
            return dac.GetByTableName(tableName);
        }
        public List<TableModel> GetTableListByColumn(string columnName)
        {
            TableDac dac = new TableDac();
            dac.SortPropertyName = "TableName";
            return dac.GetByColumnName(columnName);
        }
        public TableModel GetTable(string id)
        {
            TableDac dac = new TableDac();
            return dac.Get(id);
        }
        public void SetTable(TableModel model)
        {
            TableDac dac = new TableDac();
            dac.Set(model);
        }
    }
}
